package com.dingup.paike.service.pk;

import com.dingup.api.bean.page.PageData;
import com.dingup.paike.adapter.pk.PkLessonInfoAdapter;
import com.dingup.paike.bean.requestBean.pk.PkLessonInfoRequestBean;
import com.dingup.paike.bean.requestBean.pk.PkLessonInfoSaveBatchRequestBean;
import com.dingup.paike.bean.requestBean.pk.PkLessonInfoScreenPageBean;
import com.dingup.paike.model.pk.PkLessonInfo;
import org.bouncycastle.crypto.InvalidCipherTextException;

import java.util.List;
import java.util.Map;

/**
 * Created by wancheng on 2018/9/27.
 */
public interface PkLessonInfoService {

    PkLessonInfo save(PkLessonInfoRequestBean pkLessonInfoRequestBean) throws Exception;

    PkLessonInfo update(PkLessonInfoRequestBean pkLessonInfoRequestBean) throws Exception;

    PageData getPkLessonInfoAdapter(PkLessonInfoScreenPageBean pageBean);

    PkLessonInfoAdapter getPkLessonInfoAdapter(Integer id);

    List<Map<String, Integer>> getLessonCount(Boolean ifPreLesson);

    void deleteBatchOfLesson(Integer[] lessonIds, String operaUserId);

    void saveBatchOfLesson(PkLessonInfoSaveBatchRequestBean bean, String opearUserId, Boolean ifSyncEeo) throws Exception;

    /**
     * 多个表单批量提交
     *
     * @param beanList
     * @param opearUserId
     */
    void saveBatchOfLessonMultiForm(List<PkLessonInfoSaveBatchRequestBean> beanList, String opearUserId) throws Exception;

    void checkAndSaveEeoUserInfo(String userId) throws Exception;

    /**
     * 获取唤醒客户端并进入教室链接
     *
     * @param userId String
     * @param lessonId Integer
     * @return String
     */
    String getLoginLinked(String userId, Integer lessonId) throws Exception;

    void initVideoInfo(PkLessonInfoAdapter pkLessonInfoAdapter);

    Integer getPkLessonCountNextDay(String userId);

    /**
     * 删除班级时 同时删除未上的课程节
     *
     * @param classId
     */
    void deletePkLessonByClass(Integer classId);

    /**
     * 排课冲突检查
     *
     * @param pkLessonInfoRequestBean
     * @param pkLessonInfo
     * @return
     * @throws InvalidCipherTextException
     */
    public Boolean checkTime(PkLessonInfoRequestBean pkLessonInfoRequestBean, PkLessonInfo pkLessonInfo) throws InvalidCipherTextException;
}
